package utils

import (
	"lottery_code/comm"
	"lottery_code/models"
	"lottery_code/services"
)

func UpdateGiftTime() {
	dao:=services.NewGiftService()
	list := make([]models.LtGift, 0)
	list = dao.GetAll(false)
	for _, data := range list {
		data.TimeBegin =comm.NowUnix() - 89640*30
		data.TimeEnd =comm.NowUnix() + 89640*30
		dao.Update(&data, nil)
	}
}
